﻿using FileSC.DB.Database;
using FileSC.DB.Entities;
using FileSC.WEBService.Dto;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FileSC.WEBService.Db
{
    internal static class DownloadInfo
    {
        internal static IList<DownloadJobInfo> ToList()
        {
            IList<DownloadJobInfo> jobs;
            using (var db = new DownloadJobDB())
            {
                jobs = db.GetInfos().OrderByDescending(info => info.CreateTime).ToList();
            }

            return jobs;
        } 
    }
}
